package com.cssy.authority.dao;


import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.cssy.authority.entity.User;
import com.cssy.authority.entity.UserExample;

public interface UserDAO {
    void insert(User record) throws SQLException;

    int updateByPrimaryKey(User record) throws SQLException;

    int updateByPrimaryKeySelective(User record) throws SQLException;

    List selectByExample(UserExample example) throws SQLException;

    User selectByPrimaryKey(Long id) throws SQLException;

    int deleteByExample(UserExample example) throws SQLException;

    int deleteByPrimaryKey(Long id) throws SQLException;

    int countByExample(UserExample example) throws SQLException;

    int updateByExampleSelective(User record, UserExample example) throws SQLException;

    int updateByExample(User record, UserExample example) throws SQLException;
    
    List getUserCondtion(Map map) throws SQLException;
    
    int getSelectCount(Map map) throws SQLException;
    
    List getSelectUser(Map map) throws SQLException;
    
   
    
    User getByUserName(String userName) throws SQLException;
    /**
     * 获取员工的入职时间
     * @param userId
     * @return
     * @throws SQLException
     */
    Date getEnterDate(Long userId) throws SQLException;
    /**
     * 查询员工的工号
     * @param userId
     * @return
     * @throws SQLException
     */
    String getUserStaffId(String userId) throws SQLException;
    /**
     * 获取指定日期要过生日的人员名单
     * @param date
     * @return
     * @throws SQLException
     */
    List<User> getBirthdayUser(Date date) throws SQLException;
    /**
     * 获取指定日期到期的合同人员信息名单
     * @param date
     * @return
     * @throws SQLException
     */
    List<User> getContractExpUser(Date date) throws SQLException;
    /**
     * 获取预期转正日期的人员
     * @param date
     * @return
     * @throws SQLException
     */
    List<User> getToPostiveUser(Date date) throws SQLException;
    /**
     * 冻结用户
     * @param userId
     * @throws SQLException
     */
    void deleteUser(int userId) throws SQLException;
    
    int updatePassword(Map map) throws SQLException;
    
    /**
     * 不需要进行角色关联，主要用于后台用户角色管理
     * @param map
     * @return
     * @throws SQLException
     */
    int getSelectCountNoRole(Map map) throws SQLException;
    /**
     * 不需要进行角色关联，主要用于后台用户角色管理
     * @param map
     * @return
     * @throws SQLException
     */
    List getSelectUserNoRole(Map map) throws SQLException;
}